package com.ever.ssh.demo.action;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.beans.factory.annotation.Autowired;

import com.ever.ssh.demo.service.OrderService;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author xiai_fei
 * 
 * @date 2012-9-4 下午10:10:26
 * @version 1.0
 */
@Results({ @Result(name = "create", location = "/ok.jsp") })
public class OrderAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private static final Log log = LogFactory.getLog(OrderAction.class);

	private String price;

	private String description;

	@Autowired
	private OrderService orderService;

	// @Action(value="create")
	public String createOrder() {
		log.info("进入订单创建方法>>>>>>>");
		orderService.createOrder(price, description);
		return "create";
	}

	/**
	 * @return the price
	 */
	public String getPrice() {
		return price;
	}

	/**
	 * @param price
	 *            the price to set
	 */
	public void setPrice(String price) {
		this.price = price;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

}
